<?php

require_once 'Response.php';
require_once 'DB.php';


$pdo = DB::getInstance()->connect();

$stmt = $pdo->query("SELECT * FROM `shand` GROUP BY id DESC"); //返回一个PDOStatement对象
$views = $stmt->fetchAll(); //获取所有

// foreach ($news as $key => &$item) {
    // $item['time'] = date('Y-m-d H:i:s', $item['create_time']);
// }

Response::json(200, '获取成功！', $views);